home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Agent Central Host Computer
/
Agent - Central Host Computer.iso
/
_SETUP.1
/
vbusprobe50.sql
< prev
next >
Wrap
Text File
|
2000-05-12
|
1KB
|
32 lines
/*
Lists all probed bus cashboxes, with totals for accepted cash and totalcash. Outer join
of vprevinsert allows for the case where an insert record is not found for the cashbox
*/
CREATE OR REPLACE VIEW VBUSPROBE50 ( PDATE,
CONVERSION_NUM, PULL, PROBEDCASH, SM_TOKENS,
LG_TOKENS, T_SM_TOKENS, T_LG_TOKENS, TOTALCASH,
CASHBOX_GLID, CLOSE_COUNT, INSERT_DATE, FAREBOX_GLID,
BUS_ID, GARAGE_ID ) AS SELECT PROBEHIST.pdate,
PROBEHIST.conversion_num,
PROBEHIST.cbintent pull,
vvbpmoneydet.probedcash,
vvbpmoneydet.sm_tokens,
vvbpmoneydet.lg_tokens,
vvbpmoneydet.t_sm_tokens,
vvbpmoneydet.t_lg_tokens,
vvbpmoneydet.totalcash,
vvbpmoneydet.cashbox_glid,
vvbpmoneydet.close_count,
vprevinsert.insert_date ,
PROBEHIST.farebox_GLID ,
BUS.BUS_ID ,
GARAGE.GARAGE_ID
FROM PROBEHIST, vvbpmoneydet , vprevinsert , FAREBOX, BUS, GARAGE
WHERE PROBEHIST.conversion_num = vvbpmoneydet.conversion_num AND
vvbpmoneydet.conversion_num = vprevinsert.conversion_num(+) AND
vvbpmoneydet.close_count = vprevinsert.close_count(+) AND
PROBEHIST.FAREBOX_GLID = FAREBOX.GLID AND
FAREBOX.LOCATION = BUS.GLID AND
BUS.GARAGEID = GARAGE.GLID;